package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * <p>
 * 需求类
 * </p>
 *
 * @author cy
 * @since 2020-08-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Demand extends Model<Demand> {

    private static final long serialVersionUID = 1L;

    public static final int NO_PASS=-1;

    public static final int CHECK=0;

    public static final int PASS=1;

    //用于分页查需求中
    //需求报名未开始
    public static final int NO_APPLY_TIME=1;

    //需求处于报名中
    public static final int APPLYING=2;

    //需求报名已结束
    public static final int APPLY_END=3;

    @TableId(value = "demand_id", type = IdType.AUTO)
    private Integer demandId;

    private String demandName;

    private String demandIntro;

    private String demandType;

    private BigDecimal price;

    private String time;

    private Integer uId;

    private Integer state;

    private String linkMan;

    private String linkPhone;

    private LocalDate beginTime;

    private LocalDate endTime;

    private LocalDate deliverTime;

    @Override
    protected Serializable pkVal() {
        return this.demandId;
    }

}
